package com.javabasestage2.Object.ObjectBase.HomeWork;

public class HomeWork10 {
    public static void main(String[] args) {
       Test t = new Test();


    }
}

class  Demo{
    int i = 100;
    public  void m(){
        int j = i++;
        System.out.println("i=" + i);//101
        System.out.println("j=" + j);//100【先赋值后自增】
    }
}
class Test{
    public static void main(String[] args) {
        Demo d1 =new Demo();
        Demo d2 = d1;
        d2.m();
        System.out.println(d1.i);//100  【d1和d2相互独立】
        System.out.println(d2.i);//101
    }
}